package cn.findviewbydream.dto;

import java.io.Serializable;

/**********************************
 * 工程：cn.findviewbydream.dto
 * 作者：白雨濃 evil
 * 时间：17-4-17 下午3:47
 * 邮箱：evilbai@foxmail.com
 * 内容：Result集合包装
 **********************************/
public class Result<T> implements Serializable
{
    private Integer code;/*状态码*/
    private String msg;/*提示信息*/
    private T data;/*数据*/

    public Result()
    {
    }

    public Result(Integer code, String msg, T data)
    {
        this.code = code;
        this.msg = msg;
        this.data = data;
    }

    public Integer getCode()
    {
        return code;
    }

    public void setCode(Integer code)
    {
        this.code = code;
    }

    public String getMsg()
    {
        return msg;
    }

    public void setMsg(String msg)
    {
        this.msg = msg;
    }

    public T getData()
    {
        return data;
    }

    public void setData(T data)
    {
        this.data = data;
    }

    @Override
    public String toString()
    {
        return "Result{" +
                "code=" + code +
                ", msg='" + msg + '\'' +
                ", data=" + data +
                '}';
    }
}
